import { ref, computed } from "vue";
import { defineStore } from "pinia";

export const useLoginStore = defineStore("LOGIN", {
  //   const count = ref(0);
  //   const doubleCount = computed(() => count.value * 2);
  //   function increment() {
  //     count.value++;
  //   }
  state() {
    return {
      isShowLoginModel: false,
      isReMountedTaBBar: 0,
    };
  },
  actions: {
    changeShowLogin(payload?: boolean) {
      this.isShowLoginModel = !this.isShowLoginModel;
      // if (payload) {
      //   this.isShowLoginModel = payload;
      // } else {
      //   this.isShowLoginModel = !this.isShowLoginModel;
      // }
    },
    ReMountedLogin() {
      this.isReMountedTaBBar++;
    },
  },

  //   return { count, doubleCount, increment };
});
